package com.huiyou.adminapi.repository;

import com.huiyou.adminapi.common.model.SysUser;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends JpaRepository<SysUser, String> {

    Page<SysUser> findByNameContaining(String name, Pageable pageable);

    SysUser findByAccountAndPasswordAndStatusIs(String account, String password, int status);

    List<SysUser> findByAccount(String account);

    List<SysUser> findByAccountAndIdIsNot(String account, String id);
}


